package com.jscm.openprocess;


import com.App;
import com.jscm.WindowShow;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;

/**
 * 打开进程列表
 */
public class OpenProcessWindow {
    public static Stage stage = new Stage();
    static {
        init();
    }
    public static void init(){
        stage.initOwner(App.stage);
        stage.initModality(Modality.WINDOW_MODAL);
        stage.setAlwaysOnTop(true);
        stage.setResizable(false);
        stage.setTitle("选择进程- 左键双击确认");
        stage.setWidth(300);
        stage.setHeight(500);
        stage.setOnCloseRequest(new EventHandler<WindowEvent>() {
            @Override
            public void handle(WindowEvent event) {
                stage.hide();
            }
        });
        stage.setScene(new Scene(OpenProcessShow.pane));
    }

}
